home *** CD-ROM | disk | FTP | other *** search
/ New Star Software Collection / NSS_Collection.iso / 3-004 ms visual basic pro 30 / disk7 / samples.tx_ / samples.bin
Text File  |  1993-04-27  |  19KB  |  474 lines

  1.                               SAMPLES.TXT
  2.  
  3.            Samples Notes for Microsoft (R) Visual Basic (TM)
  4.                           Professional Edition
  5.  
  6.                               Version 3.00
  7.  
  8.                   (C) Copyright Microsoft Corporation, 1993
  9.  
  10. ========
  11. Contents
  12. ========
  13.  
  14. Sample  Description
  15. ------  -----------
  16.   1     MAPI
  17.   2     Multimedia
  18.   3     Outline
  19.   4     Pen
  20.   5     PicClip
  21.   6     ODBC
  22.   7     Communications
  23.  
  24. ===============
  25. 1:  MAPI Sample
  26. ===============
  27. Program example using the MSMAPI.VBX controls, MapiMessages and 
  28. MapiSession controls.
  29.  
  30. Note:  To run this sample, you need a MAPI-compliant messaging
  31.        system such as the one contained in Microsoft Windows for
  32.        Workgroups.
  33.  
  34. BRIEF DESCRIPTION:
  35. This sample program illustrates the use of the MAPI controls by 
  36. sending and receiving electronic mail.
  37.  
  38. BACKGROUND:
  39. The MapiSession control establishes a MAPI session and signs off
  40. from a MAPI session.  The MapiMessages control allows you to 
  41. perform a variety of messaging systems functions after a messaging 
  42. session has been established.  These functions include accessing, 
  43. downloading, and sending messages, displaying the details and 
  44. address book dialog boxes, accessing data attachments, resolving 
  45. recipient names during addressing, and performing compose, reply, 
  46. reply-all, forward, and deleting actions on messages.
  47.  
  48. FILES:
  49.    MAILLST.FRM.......Form for displaying the list of mail messages.
  50.    MAILLST.FRX.......The binary portion of the mail messages form.
  51.    MAILOPTF.FRM......Form for setting options.
  52.    MAILSUP.BAS.......Module of support routines for the example.
  53.    MSGVIEW.FRM.......Form in which a viewed message is displayed.
  54.    MSGVIEW.FRX.......The binary portion of the viewed messages form.
  55.    NEWMSG.FRM........Form for creating a new message.
  56.    VBMAIL.FRM........The main form.
  57.    VBMAIL.FRX........The binary portion of the main form.
  58.    VBMAIL.MAK........The MAKE file for the project.
  59.  
  60. TO RUN:
  61. After starting the Visual Basic environment (VB.EXE), you can load
  62. files in this sample program by choosing Open Project from the File
  63. menu and select the VBMAIL.MAK file.
  64.  
  65.  
  66. =====================
  67. 2:  Multimedia Sample
  68. =====================
  69. This sample program illustrates the use of some of the device types
  70. supported by the Media Control Interface (MCI).  The four device 
  71. types used in this program are:
  72.  
  73. Device Type     Description
  74. -----------     -----------
  75. MMMovie         Plays Multimedia movie files (*.MMM).
  76. CDAudio         Plays audio discs from the CD-ROM drive.
  77. Sequencer       Plays MIDI sequencer sound files (*.MID).
  78. WaveAudio       Plays digitized waveform sound files (*.WAV).
  79.  
  80. HARDWARE REQUIREMENTS:
  81. In order to access a CD-ROM drive or a sound card, the hardware,
  82. along with any supporting device drivers, should be installed
  83. and configured for the machine.  The following table lists
  84. the hardware required for the MCI device types used in this
  85. program:
  86.  
  87. Device Type     Hardware
  88. -----------     --------
  89. MMMovie         No extra hardware.  *See software requirements.
  90. CDAudio         CD-ROM drive.
  91. Sequencer       Sound card (e.g., Sound Blaster Pro)
  92. WaveAudio       Sound card.
  93.  
  94. SOFTWARE REQUIREMENTS:
  95. In order to run the MCI application, Microsoft Windows with
  96. Multimedia Extensions 1.0, or Windows with Multimedia must be 
  97. installed.  The Multimedia Extensions include device drivers for
  98. the different types of MCI devices.
  99.  
  100. To access a specific MCI device type, the corresponding MCI device
  101. driver must be installed.  The following table lists the device 
  102. drivers required for the MCI device types used in this program:
  103.  
  104. Device Type     Device Driver
  105. -----------     -------------
  106. MMMovie         MCIMMP.DRV    *See note below.
  107. CDAudio         MCICDA.DRV
  108. Sequencer       MCISEQ.DRV
  109. WaveAudio       MCIWAVE.DRV
  110.  
  111. The [mci] section of the SYSTEM.INI file contains a list of the
  112. installed MCI device types.  This is what your file would look
  113. like if all 4 of the above device types were installed:
  114.  
  115. [mci]
  116. CDAudio=mcicda.drv
  117. WaveAudio=mciwave.drv
  118. Sequencer=mciseq.drv
  119. MMMovie=mcimmp.drv
  120.  
  121. BACKGROUND:
  122. The MCI control provides a high-level interface for using 
  123. multimedia devices. Using the property settings of a control, you
  124. can determine the settings and the actions of a device.
  125.  
  126. The MCI control is also smart enough to know what actions are 
  127. relevant for the current state of a device.  For example, if you 
  128. click a "Pause" button while playing a movie, the "Play" button 
  129. is automatically re-enabled.
  130.  
  131. MMMovie NOTE:
  132. If you are unable to run an animation movie (*.MMM file), make 
  133. sure the MCIMMP.DRV and MMP.DLL files are installed on your 
  134. machine.  To install the animation driver from Windows 3.1, run 
  135. the "Drivers" applet from the Control Panel, insert Disk 1 of the
  136. Professional Edition.  Select "Unlisted Driver," and accept "A:\"
  137. as the directory.  You will then be ready to use the animation 
  138. features of the MCI control.
  139.  
  140. FILES:
  141.    ABOUTBOX.FRM.......The dialog box for the "About Box."
  142.    ABOUTBOX.FRX.......The binary portion of the "About Box" form.
  143.    ANIMATE.FRM........Form for playing Multimedia Movie files.
  144.    CD.FRM.............The form for playing compact disc audio.
  145.    CD.FRX.............The binary portion of the compact disc form.
  146.    GLOBAL.BAS.........Global data types and declarations.
  147.    MCITEST.BAS........Global Subs and Functions.
  148.    MCITEST.FRM........The main form.
  149.    MCITEST.FRX........The binary portion of the main form.
  150.    MCITEST.MAK........The make file for the project.
  151.    MCITEST.MID........Sample MIDI sequencer file.
  152.    MCITEST.MMM........Sample Multimedia Movie file.
  153.    MCITEST.WAV........Sample waveform file.
  154.    OPENDLG.FRM........Form for holding the common dialog control.
  155.    WAVE.FRM...........Form for playing waveform and MIDI files.
  156.  
  157. TO RUN:
  158. In the Visual Basic environment (VB.EXE), you can load the files
  159. in this sample program by choosing Open Project from the File 
  160. menu, and selecting the MCITEST.MAK file.
  161.  
  162. Two additional files appear in the Project Window:
  163.  
  164. MCI.VBX............MCI control.
  165. CMDIALOG.VBX.......Common Dialog control.
  166.  
  167. ==================
  168. 3:  Outline Sample
  169. ==================
  170. Program example using the MSOUTLIN.VBX control.
  171.  
  172. BRIEF DESCRIPTION:
  173. This sample program illustrates the use of the Outline control 
  174. with an address book database application.
  175.  
  176. BACKGROUND:
  177. The outline control allows users to graphically present hierarchically
  178. structured data in a variety of different ways.
  179.  
  180. FILES:
  181.    PHONE.FRM.........The main form.
  182.    PHONE.FRX.........Binary data for the main form.
  183.    PHONE.MAK.........The MAKE file for the project.
  184.    PHONE.MDB.........Database file.
  185.    PHONE.LDB.........Database file.
  186.    FIRSTTAB.BMP......Bitmap for the project.
  187.    LASTTAB.BMP.......Bitmap for the project.
  188.    MIDTAB.BMP........Bitmap for the project.
  189.  
  190. TO RUN:
  191. After starting the Visual Basic environment (VB.EXE), you can load
  192. files in this sample program by choosing Open Project from the File
  193. menu and select the PHONE.MAK file.
  194.  
  195. ==============
  196. 4:  Pen Sample
  197. ==============
  198. Note:  To run this sample you must have Windows for Pen Computing, 
  199.        or install the PENWIN.DLL file.  See below.
  200.  
  201. BRIEF DESCRIPTION of PEN SAMPLE PROGRAM:
  202. This sample program illustrates many uses of the Pen controls:
  203.   * the new On-Screen Keyboard control
  204.   * inking and displaying bitmaps on the new InkOnBitmap control
  205.   * handwriting recognition in both delayed and non-delayed mode
  206.   * recognition of gestures
  207.   * transfer of ink data between controls
  208.   * manipulation of the Recognition Context data structure
  209. and more.
  210.  
  211. The file PENAPI.TXT contains function and constant declarations
  212. for the entire set of Windows for Pen Computing API.
  213.  
  214. FILES:
  215.    DELAY.FRM.........Form for demonstrating Delayed Recognition.
  216.    DELAY.FRX.........The binary for DELAY.FRM.
  217.    EDITSUBF.FRM......Support Form for Gesture demonstration.
  218.    GESTFRM.FRM.......Form for demonstrating Custom Gestures.
  219.    INKFRM.FRM........Form for showing transfer of Ink data.
  220.    IOBFRM.FRM........Form demonstrating the Ink On Bitmap control.
  221.    IOBFRM.FRX........The binary for IOBFRM.FRM.
  222.    KEYBRD.FRM........Form for the On-Screen Keyboard Button demo.
  223.    KEYBRD.FRX........The binary for KEYBRD.FRM.
  224.    PENAPI.TXT........Pen function declarations and constants.
  225.    PENMAIN.FRM.......Main form.
  226.    PENMAIN.FRX.......The binary for MAIN.FRM.
  227.    PENSMPL.MAK.......The MAKE file for the project.
  228.    RCFRM.FRM.........Form demonstrating the Recognition Context.
  229.    GRAFPAPR.BMP......Bitmap for creating graph paper effect.
  230.    RULEPAPR.BMP......Bitmap for creating ruled paper effect.
  231.    SKBFACE.BMP.......Bitmap of default keyboard on SKB Button.
  232.    TRANSFRM.FRM......Form for demonstrating transfer of ink data.
  233.  
  234. TO RUN:
  235. After starting the Visual Basic environment (VB.EXE), you can load
  236. files in this sample program by choosing Open Project from the File
  237. menu and select the PENSMPL.MAK file.
  238.  
  239. Installing PENWIN.DLL:
  240. This procedure will result in a system that will let you run
  241. applications that contain Visual Basic BEdit, HEdit, InkOnBitmap,
  242. and SKB Button controls and call the Windows for Pen Computing APIs.
  243. You will not be able to perform handwriting recognition or draw ink
  244. on the screen. Microsoft Windows 3.1 is required.
  245.  
  246. SYSTEM.INI Changes
  247. The following items must be added or changed in your SYSTEM.INI
  248. file so that the pen extensions will work.  NOTE: Back up your old
  249. SYSTEM.INI file before proceeding.
  250.  
  251. 1.  In the "[boot]" section:
  252.       Add "penwindows" to the list of drivers after "drivers=".
  253.       For example:
  254.         drivers = mmsystem.dll penwindows
  255.  
  256. 2.  In the "[drivers]" section:
  257.       Add a new item "penwindows" and set it equal to the path to 
  258.       PENWIN.DLL.
  259.       For example:
  260.         penwindows = C:\WINDOWS\PENWIN.DLL
  261.  
  262. 3.  Restart Windows.
  263.  
  264. When Windows is restarted PENWIN.DLL will be loaded as an
  265. installed driver and you will be able to run applications
  266. containing Visual Basic BEdit, HEdit, InkOnBitmap, and SKB
  267. Button controls and call the Windows for Pen Computing APIs.
  268.  
  269. ==================
  270. 5:  PicClip Sample
  271. ==================
  272. Program example using the PICCLIP.VBX control.
  273.  
  274. BRIEF DESCRIPTION:
  275. This sample program illustrates one of the many possible uses of
  276. the Picture Clipping control.
  277.  
  278. BACKGROUND:
  279. This sample application uses the PicClip control to spin a top.
  280.  
  281. FILES:
  282.    INFOFORM.FRM......The information form.
  283.    INFOFORM.FRX......The binary data for the information form.
  284.    REDTOP.FRM........The main form.
  285.    REDTOP.FRX........The binary data for the main form.
  286.    REDTOP.MAK........The MAKE file for the project.
  287.  
  288. TO RUN:
  289. After starting the Visual Basic environment (VB.EXE), you can 
  290. load files in this sample program by choosing Open Project from
  291. the File menu and selecting the REDTOP.MAK file.
  292.  
  293. ========
  294. 6:  ODBC
  295. ========
  296. Program example using ODBC and the VT (Virtual Table) object layer.
  297.  
  298. Note:  To access ODBC data sources with this sample you must
  299.        first install ODBC using the ODBC setup program provided
  300.        with Visual Basic Professional.
  301.  
  302. BRIEF DESCRIPTION:
  303. This sample program illustrates various programming techniques
  304. used to access data through the VT layer built into Visual Basic
  305. Professional.  It behaves like a general purpose database utility 
  306. capable of the following functions:
  307.        1. Table Creation
  308.        2. Table Modification (adding and deleting fields and indexes)
  309.        3. Data Browsing/Modifying one record at a time using a
  310.           dynaset or a table.
  311.        4. Data Browsing via the Grid control (non-updatable)
  312.        5. Data Browsing/Modifying via the new Data Control
  313.        6. Data Export to Tab Delimited text file
  314.        7. Direct SQL Statement execution for any SQL supported
  315.           functions such  as Insert, Update, Delete, Drop, Create,
  316.           Dump, etc.
  317.        8. AdHoc Query tool that helps users unfamiliar with SQL
  318.           create complex queries with where clauses, joins, order
  319.           by and group by expressions while limiting output to
  320.           selected columns
  321.        9. Transaction Processing
  322.       10. Copying table structures and data to same or different 
  323.           server
  324.       11. Support of Access, Dbase 3, Dbase 4, FoxPro 2.0, Paradox 
  325.           3.x, Btrieve, SQL and Oracle data, both DDL and DML.
  326.  
  327. The code contains comments to help explain the use of the various
  328. methods in the data access layer.  Code and forms may be copied from 
  329. this application to other applications with minimal modification.
  330.  
  331. ODBC BACKGROUND:
  332. ODBC  (Open DataBase Connectivity) is a standard adopted by
  333. multiple vendors designed to enable users to connect to any data
  334. source with a single application.  This is achieved through a
  335. layered approach including:
  336.        1. Programming Layer-embedded functions in the development
  337.           tool which in this case is Visual Basic Professional.
  338.        2. Driver Manager-the basic ODBC library that routes calls
  339.           to the appropriate driver.
  340.        3. Data Driver - the library of functions that acts upon a
  341.           specific database backend such as SQL Server, Xbase,
  342.           Excel, etc. (note that SQL Server is the first of many
  343.           drivers to become available for ODBC)
  344. These layers work together to enable data access from any source
  345. for which an ODBC driver exists.  The sample application will work,
  346. without modification, on any new level one ODBC driver that becomes
  347. available.  With multiple drivers, connections may be made to
  348. different data sources from the same application at the same time
  349. enabling seamless data access from disparate data sources.
  350.  
  351. FILES:
  352.    ABOUTBOX.FRM......Standard "About box" for the application.
  353.    ABOUTBOX.FRX......Icon for the "About Box".
  354.    ADDFIELD.FRM......Form to add fields to Tables.
  355.    CPYSTRU.FRM.......Form to copy Table structures.
  356.    DATABOX.FRM.......General purpose list form.
  357.    DYNAGRID.FRM......Form used to display data in a Grid control.
  358.    DYNAGRID.FRX......Icon for DYNAGRID.FRM.
  359.    DYNASET.FRM.......Form to display data in single record mode.
  360.    DYNASET.FRX.......Icon for DYNASET.FRM
  361.    FIND.FRM..........Form used to find records in a Dynaset.
  362.    INDEXADD.FRM......Form used to add indexes to Tables.
  363.    JOIN.FRM..........Form used to add Joins to the Query Builder.
  364.    OPENDB.FRM........Form used to open a database.
  365.    QUERY.FRM.........Form used to build Queries.
  366.    QUERY.FRX.........Icon for QUERY.FRM.
  367.    REPLACE.FRM.......Form to perform global replaces on a Table.
  368.    REPLACE.FRX.......Icon for REPLACE.FRM.
  369.    SEEK.FRM..........Form used to get input for Seek function on 
  370.                      Table form.
  371.    SQL.FRM...........Form to enter and execute SQL statements.
  372.    SQL.FRX...........Icon for SQL.FRM.
  373.    TABLES.FRM........Form used to display table lists.
  374.    TABLES.FRX........Icon for TABLES.FRM.
  375.    TABLEOBJ.FRM......Form used to display data in Table object
  376.    TABLEOBJ.FRX......Icon for TABLEOBJ.FRM
  377.    TBLSTRU.FRM.......Form to display and modify table structures.
  378.    VDMDI.FRM.........Main MDI form for the application.
  379.    VDMDI.FRX.........Icon for VDMDI.FRM.
  380.    VISDATA.BAS.......Support functions for the application.
  381.    VISDATA.ICO.......Icon for the applicaiton.
  382.    VISDATA.MAK.......Make file for applicaiton.
  383.    ZOOM.FRM..........Form to zoom in on character data in the
  384.                      dynaset forms.
  385.  
  386. TO RUN:
  387. After starting the Visual Basic environment (VB.EXE), you can
  388. load files in this sample program by choosing Open Project from
  389. the File menu and select the VISDATA.MAK file in the
  390. SAMPLES\VISDATA directory.
  391.  
  392. If you want to open a local database, you simply need to choose
  393. the type of database and a file open common dialog will be 
  394. provided with the file type set to the requested data file type.
  395.  
  396. If you choose ODBC from the File/Open menu, the next dialog you 
  397. will see is the Open DataBase form.  Since you probably have no 
  398. servers entered, you will need to enter a name for an existing 
  399. SQL server on your network.  If you already know the user ID and 
  400. password, you can add them as well.  The Database name is optional.  
  401. Once you have entered this data, select 'Okay' and you should be
  402. able to log on to the server.  You may get some more dialogs in 
  403. the process.  Answer any questions you can and ask the SQL 
  404. administrator for help if you run into problems or don't know some 
  405. of the parameters.
  406.  
  407. Once a database is open, a simple double click on a table name
  408. will open the table in the selected mode (Single Record or Table
  409. View).  Use the Query Builder to create dynasets with selected
  410. data from one or more tables at a time. If "Use Data Control" or
  411. "Use Grid" is chosen, a dynaset will be created. However, the 
  412. following objects will be created under the following circumstances 
  413. when the "No Data Control" option is selected:
  414.  
  415. Data Type:      Feature Chosen:   Object Type Created:
  416. ------------------------------------------------------
  417. MS Access       Table Open        Table
  418. MS Access       Query Open        Dynaset
  419. MS Access       Execute SQL       Dynaset
  420. ISAM            Table Open        Table
  421. ISAM            Execute SQL       Dynaset
  422. ODBC            Any               Dynaset
  423.  
  424. The table is always updatable and dynaset will be updatable in 
  425. most cases except on ODBC with no unique index, certain multiple 
  426. table joins and other SQL select statements such as count(*), 
  427. max(), etc.
  428.  
  429. ==========================
  430. 7:  Communications Samples
  431. ==========================
  432.  
  433. VBTERM Sample
  434. -------------
  435. VBTERM is a terminal emulation program example using MSCOMM.VBX.
  436.  
  437. BRIEF DESCRIPTION:
  438. This sample program illustrates how to use the communications
  439. control with a serial port.
  440.  
  441. BACKGROUND:
  442. MSCOMM.VBX allows you to open a serial port, change its settings, 
  443. send and receive data through the port, and monitor and set many 
  444. of the different data lines.  It's dual-method access allows for 
  445. both polling and event driven communications.
  446.  
  447. FILES:
  448.    CANSEND.FRM.......Dialog box used during file transfer.
  449.    TERMSET.FRM.......Form used to change the serial port settings.
  450.    TERMSET.FRX.......Binary data for TERMSET.FRM.
  451.    VBTERM.FRM........The main form.
  452.    VBTERM.FRX........Binary data for VBTERM.FRM.
  453.    VBTERM.GLO........Global declarations.
  454.    VBTERM.MAK........The MAKE file for the project.
  455.  
  456. TO RUN:
  457. After starting the Visual Basic environment (VB.EXE), you can load
  458. files in this sample program by choosing Open Project from the File
  459. menu and select the VBTERM.MAK file.
  460.  
  461. Dialer Sample
  462. -------------
  463. DIALER is a program example demonstrating how to dial out using 
  464. MSCOMM.VBX with a modem.
  465.  
  466. FILES:
  467.    DIALER.FRM........The main form.
  468.    DIALER.MAK........The MAKE file for the project.
  469.  
  470. TO RUN:
  471. After starting the Visual Basic environment (VB.EXE), you can load
  472. files in this sample program by choosing Open Project from the File
  473. menu and select the DIALER.MAK file.
  474.